<?php
class CelibataireController extends Zend_Controller_Action{ 

	public function init()
    {
        /* Initialize action controller here */
    	//var_dump($this->_request->getParams());
    	//Zend_Debug::dump(APPLICATION_ENV);
    }
    
    public function inscriptionAction(){
    	$inscription =  new Application_Form_Inscription();
       $this->view->formulaire= $inscription;
       $request = $this->getRequest();
 
      if ($this->getRequest()->isPost()) {
            if ($inscription->isValid($request->getPost())) {
                $comment = new Application_Model_Celibataire($inscription->getValues());
                $mapper  = new Application_Model_CelibataireMapper();
                $mapper->inscription($comment);
               // return $this->_helper->redirector('index','index');
                
            }
        }
        
       
    }
    
    public function logoutAction(){
    	Zend_Auth::getInstance()->clearIdentity();
    	$this->_redirect('/');
    }
    
}